package com.springcloud.regin.service;

import com.springcloud.regin.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Desc: value 为 远程掉用功其他服务的服务名，
 * FeignConfig.class 为 Feign Client的配置类
 * @FeignClient 注解用来声明一个 Feign Client，其中value为远程调用其他服务的服务名。
 * @Date: 2020-06-25
 * @Version:v1.0
 */
@FeignClient(value = "springcloud-eureka-client", configuration = FeignConfig.class, fallback = FeignFallbackService.class)
public interface FeignService {

    @GetMapping(value = "/hello")
    String sayHello(@RequestParam(value = "name") String name);
}
